
package com.rx.mgt.service;  

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.rx.mgt.dao.StatisticsInfoDao;
import com.rx.mgt.domain.StatisticsInfo;
import com.rx.mgt.po.UsersBo;
import com.rx.mgt.util.DateUtil;
import org.springframework.transaction.annotation.Transactional;

/** 
 * ClassName:StatisticsInfoService 
 * Function :
 * Reason   : 
 * Date     :Feb 7, 2017 9:25:58 AM 
 * @author   luolei 
 * @since    JDK 1.6
 */
@Service
@Transactional
public class StatisticsInfoService {
    @Autowired
    StatisticsInfoDao statisticsInfoDao;
    public List<StatisticsInfo> getStatisticsInfoCount(UsersBo usersBo,int year){
        String startDate=DateUtil.nowTimeString(DateUtil.getYearLast(year-1));
        String endDate=DateUtil.nowTimeString(DateUtil.getYearLast(year));;
        System.out.println("startDate"+startDate+"endDate"+endDate);
        usersBo.setStartDate(startDate);
        usersBo.setEndDate(endDate);
        List list = statisticsInfoDao.getStatisticsInfoCount(usersBo);
        return list;
    }

    public List<Map<String,Object>> getUserAddInfoMations(int year) {


        return statisticsInfoDao.getUserAddInfoMations(year);
    }


    public List<Map<String,Object>> queryWpVolume(int year) {

        return statisticsInfoDao.queryWpVolume(year);
    }
}
  